﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Entity;
using DAL;
using UtilLibrary;

namespace Biz
{
    public class EmployeeService:BaseService
    {
        public EmployeeService(BizEmployee pEmployee)
        {
            this.bizBaseEntity = pEmployee;
        }

        /// <summary>
        /// 获取所有人员列表
        /// </summary>
        /// <returns></returns>
        public static BizEmployeeList GetAllEmployeeList()
        {
            BizEmployeeList ret = new BizEmployeeList();

            Model1Container container = DbUtil.GetDbContainer();
            foreach (employee e in container.employee.ToList())
            { 
                BizEmployee bizEntity = new BizEmployee();
                DbUtil.DataEntityToBizObjTrans(e, bizEntity);

                ret.Add(bizEntity);
            }

            return ret;
        }
    }
}
